<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>WISSC轮滑教培服务网-查询系统</title>
    <link rel="icon" href="${base}/favicon.ico">
        <#assign base=request.contextPath  />
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css?t=1534970980648" media="all">
    <script type="text/javascript" src="${base}/js/feng.js"></script>
    <script type="text/javascript" src="${base}/js/ztree/jquery-1.4.4.min.js"></script>

    <script src="${base}/js/jquery.min.js"></script>

    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <script src="${base}/js/jquery.min.js"></script>
    <style type="text/css">
        .buttondemo{
            position: absolute;
            right: 10px;
            top: 13%;
        }

        @media screen and (max-width:599px) {
            .buttondemo{
                display: none;
            }
        }
        button{
            opacity:0.5;
            filter:alpha(opacity=50);
        }
        .layui-btn-sm {
            height: 25px;
            line-height: 25px;
            padding: 0px 18px;
            font-size: 12px;
        }
    </style>
</head>
<body class="layui-layout-body">
<script>

</script>


<script>
    //控制跳出ifream框架
    if (window != top)
        top.location.href = location.href;
</script>
<!-- layout admin -->
<!-- header -->
<div class="buttondemo">
    <button class="layui-btn layui-btn-primary layui-btn-sm" onclick="tuichu()">退出登录</button>
</div>
<div>
<#--
    <img src="${base}/team/getPhoto?path=${list[1].parameter}" style="width: 100px;height: 100px;>
-->
    <img src="${base}/configure/getPhoto?path=${url}" style="width: 100%;height: 100%"></div>
<div class="layui-layout-admin layui-layout" >
    <!-- side -->
    <div class="layui-side my-side">
        <div class="layui-side-scroll">
            <!-- 左侧主菜单添加选项卡监听 -->
            <ul class="layui-nav layui-nav-tree" lay-filter="side-main" id="nav_list">

                <#--<li class="layui-nav-item">
                    <a href="javascript:;">滑轮等级考核</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="${base}/student/student_add.html"><i class="layui-icon"></i>学员信息录入</a></dd>
                        <dd><a href="javascript:;" href-url="${base}/student/student.html"><i class="layui-icon"></i>学员信息查询</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">&lt;#&ndash;<i class="layui-icon-set">&#xe628;</i>&ndash;&gt;职业资格考核</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="${base}/occupation/occupation_add.html"><i class="layui-icon"></i>信息录入</a></dd>
                        <dd><a href="javascript:;" href-url="${base}/occupation/main.html"><i class="layui-icon"></i>信息查询</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">&lt;#&ndash;<i class="layui-icon-set">&#xe628;</i>&ndash;&gt;授权机构</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="${base}/authorization/authorization_add.html"><i class="layui-icon"></i> 信息录入</a></dd>
                        <dd><a href="javascript:;" href-url="${base}/authorization/main.html"><i class="layui-icon"></i> 信息查询</a></dd>
                    </dl>
                </li>
                <li  class="layui-nav-item">
                    <a href="javascript:;">赛事积分</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a style="padding-left: 30px;" href="javascript:;">个人积分</a>
                            <dl class="layui-nav-child ">
                                <dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/individualEvent/individual_add.html"><i class="layui-icon"></i>个人信息录入</a></dd>
                                <dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/individualEvent/main.html"><i class="layui-icon"></i>个人信息查询</a></dd>
                            </dl>
                        </dd>
                        <dd>
                            <a  style="padding-left: 30px;" href="javascript:;">战队积分</a>
                            <dl class="layui-nav-child ">
                                <dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/team/team_add.html"><i class="layui-icon"></i>战队信息录入</a></dd>
                                <dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/team/main.html"><i class="layui-icon"></i>战队信息查询</a></dd>
                            </dl>
                        </dd>
                    </dl>
                </li>


                 <li class="layui-nav-item">
                    <a  href="javascript:;">设置</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;" href-url="${base}/user/user_add.html"><i class="layui-icon"></i>用户信息录入</a></dd>
                        <dd><a href="javascript:;" href-url="${base}/user/user.html"><i class="layui-icon"></i>用户信息查询</a></dd>
                            <dd><a href="javascript:;" href-url="${base}/webPage/webPage.html"><i class="layui-icon"></i>版式设置</a></dd>
                    </dl>
                </li>-->

            </ul>
        </div>
    </div>
    <!-- 欢迎页 -->
    <div class="layui-body my-body">
        <div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
            <ul class="layui-tab-title" style="display: none">
                <li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i> </span></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe id="iframe" src="${base}/user/welcome.html" frameborder="0"></iframe>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- pay -->
<!-- 右键菜单 -->
<div class="my-dblclick-box none">
    <table class="layui-tab dblclick-tab">
        <tr class="card-refresh">
            <td><i class="layui-icon">&#x1002;</i>刷新当前标签</td>
        </tr>
        <tr class="card-close">
            <td><i class="layui-icon">&#x1006;</i>关闭当前标签</td>
        </tr>
        <tr class="card-close-all">
            <td><i class="layui-icon">&#x1006;</i>关闭所有标签</td>
        </tr>
    </table>
</div>
<script type="text/javascript" src="${base}/frame/layui/layui.js"></script>
<script type="text/javascript" src="${base}/frame/static/js/vip_comm.js"></script>
<script language="javascript">
function tuichu() {
    window.location.href='${base}/user/login.html'
}
</script>
<script>
    $.ajax({
        type : "POST", //提交方式
        url : "${base}/user/findMenu",//路径
        data :{username:$("#username").val(),password:$("#password").val()},
        async:false,
        success : function(data) {//返回数据根据结果进行相应的处理
           data=JSON.stringify(data);
            //把后台查出的用户所有信息转成json对象  包括用户角色 和角色所拥有的菜单
            var dataJson=JSON.parse(data);
            //右上角角色
            /*$("#roleId").append(dataJson.roles.roleName+"："+dataJson.username);*/
            //获取该角色的所有菜单
            var menu=dataJson.roles.menus;
            //alert("menu:"+JSON.stringify(menu))
            var pantid=[];
            var htm;
            for (var i=0;i<menu.length;i++) {
                if (menu[i].menuLev == 1 && menu[i].id != 10) {
                    $("#nav_list").append(
                            '<li class="layui-nav-item">' +
                            '<a  href="javascript:;">' + menu[i].menuName + '</a>' +
                            /*'<a  href="javascript:;">' + menu[i].menuName + '<span class="layui-nav-more"></span></a>' +*/
                            '<dl class="layui-nav-child submenu" id="' + menu[i].id + '" >' +
                            '</dl>' +
                            '</li>'
                    );
                    pantid.push(menu[i].id);
                }
                if (menu[i].id == 10) {
                    $("#nav_list").append(
                            '<li  class="layui-nav-item">' +
                            '<a href="javascript:;">赛事积分</a>' +
                            '<dl class="layui-nav-child">' +
                            '<dd>' +
                            '<a style="padding-left: 30px;" href="javascript:;">个人积分</a>' +
                            '<dl class="layui-nav-child ">' +
                            '<dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/individualEvent/individual_add.html"><i class="layui-icon"></i>个人信息录入</a></dd>' +
                            '<dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/individualEvent/main.html"><i class="layui-icon"></i>个人信息查询</a></dd>' +
                            '</dl>' +
                            '</dd>' +
                            '<dd>' +
                            '<a  style="padding-left: 30px;" href="javascript:;">战队积分</a>' +
                            '<dl class="layui-nav-child ">' +
                            '<dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/team/team_add.html"><i class="layui-icon"></i>战队信息录入</a></dd>' +
                            '<dd><a style=" background-color: white; color: #000;" href="javascript:;" href-url="${base}/team/main.html"><i class="layui-icon"></i>战队信息查询</a></dd>' +
                            '</dl>' +
                            '</dd>' +
                            '</dl>' +
                            '</li>'
                    );
                }
            }
            //循环所有菜单
            for (var j=0;j<menu.length;j++){
                //循环所有父节点ID数组
                for(var k=0;k<pantid.length;k++){
                    //如果该次父节点循环 是该次菜单的 父节点
                    if (pantid[k]==menu[j].parentId){
                        htm = document.getElementById(pantid[k]).innerHTML;
                        htm=htm+'<dd><a href="javascript:;" target="_top" href-url="${base}'+menu[j].menuUrl+'" title="'+menu[j].menuName+'" class="iframeurl"><i class="layui-icon"></i>'+menu[j].menuName+'</a></dd>'
                        document.getElementById(pantid[k]).innerHTML=htm;
                    }
                }
            }
        }
    });
</script>
</body>
</html>